export default {

  // MOBILE COOKIE
  mobileCookie: 'fita-mobile',

  // POST mobile 获取验证码
  verfityCode: '/sms/verify-code',

  // POST mobile,code,token 登录
  login: '/login',

  // GET 获取办事处、区域
  agentDistricts: '/districts',

  // POST email,alias,name,mobile,districtId,type,companyName,companyAddress 代理注册
  agentApply: '/agent-applies',

  // GET 订单列表
  orders: '/orders',

  // GET 订单详情
  orderDetail: '/orders/',

  // GET agentId 代理申请状态查询
  agentStatus: '/agent-applies/',

  // GET 获取国家
  counties: '/cars/countries',

  // GET 获取供应商
  suppliers: '/cars/suppliers',

  // GET 获取热门地点 country brand
  hotLocation: 'cars/search-hot-location',

  // GET 搜索地区 country brand code hot
  searchLocation: 'cars/search-location',

  // GET 获得基本套餐
  carsSets: 'cars/sets',

  // GET 获得基本套餐
  carsCategories: 'cars/set-categories',

  // GET Perist API 生成couponPrice
  couponPrice: '/persist/coupon-price',
  // POST 车辆详情
  carDetail: '/cars/detail',
  // POST 提交订单（没有生成ALAMO CODE）
  order: '/shopping/order',

  // GET 获取发票链接
  invoice: '/invoice/order-open',
  payHost: process.env.NODE_ENV === 'production' ? 'http://www.fita-club.com/fita-wechat/shopping/web-result' : 'http://www.fita-club.cn/fita-wechat/shopping/web-result',

  setPassword: '/reset-password',

  paying: function (orderId) {
    let payingUrl = '/shopping/orders/:orderId/paying'
    return payingUrl.replace(/:orderId/g, orderId)
  },
  orderCancel: function (orderId) {
    let cancelOrderUrl = '/orders/:orderId/cancel'
    return cancelOrderUrl.replace(/:orderId/g, orderId)
  },

  // POST 取消订单短信
  cancelOrderMessage: '/sms/cancel-order-message',

  // POST 到付
  arrivePay: function (orderId) {
    let arrivePay = '/shopping/orders/:orderId/arrive-paying'
    return arrivePay.replace(/:orderId/g, orderId)
  }
}
